home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_teo_entergears.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  104 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEO_EnterGears
  4. #
  5. # A basic cutscene cog
  6. #
  7. # [SXC]
  8. #
  9. # (C) 1998 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     message     startup
  14.     message     crossed
  15.    
  16.     keyframe    in_stand4=0in_stand4.key            local
  17.     keyframe    in_SideToHips=0in_stand1_bd_4.key   local
  18.     
  19.     surface     crosurf
  20.    
  21.     sound       indyline
  22.     sound       awesomewav=mus_gen_awesome3.wav     local
  23.        
  24.     thing       camera0
  25.     thing       cam_tgt0
  26.     thing       cam_tgt1
  27.     
  28.     #thing       actor_look_tgt0
  29.     
  30.     thing       player          local
  31.     thing       actorindy
  32.     
  33.     flex        moveSpeed=1
  34.     flex        cameraTime=5
  35.     int         chek=0          local
  36.     int         in_track0       local
  37. end
  38.  
  39. # ========================================================================================
  40.  
  41. code
  42.  
  43. startup:
  44.  
  45.     player = GetLocalPlayerThing();
  46.     
  47. return;
  48.  
  49. #........................................................................................
  50. crossed:
  51.     if ((GetSenderRef() == crosurf) && (chek == 0))
  52.     {
  53.         chek = 1;
  54.         MakeMeStop();
  55.         DeselectWeaponWait(player);
  56.         StartCutscene(1);
  57.         SetCameraLookInterp(2, 0);
  58.         
  59.         DeselectWeapon(player);
  60.         CopyPlayerHolsters(player, actorindy);
  61.         
  62.         SetThingFlags(player, 0x80000);
  63.         ClearThingFlags(actorindy, 0x80000);
  64.         AttachThingToThing(cam_tgt0, actorindy);
  65.         
  66.         SetCameraFocus(2, camera0);
  67.         SetCameraSecondaryFocus(2, actorindy);
  68.         SetCurrentCamera(2);
  69.         SetCameraFOV(30, 0, 0);
  70.         
  71.         AISetMoveSpeed(actorindy, 1.0);
  72.         AISetMoveFrame(actorindy, 1);
  73.         AIWaitforStop(actorindy);
  74.         
  75.         in_track0 = PlayKey(actorindy, in_stand4, 2, 0x00, 0);
  76.         PlayKey(actorindy, in_SideToHips, 4, 0x12, 0);
  77.         PlayVoice(player, indyline, 1, 0);
  78.         Sleep(1);
  79.         
  80.         SetCameraLookInterp(2, 1); 
  81.         SetCameraInterpSpeed(2, 2);
  82.         sleep(0.01);
  83.         SetCameraSecondaryFocus(2, cam_tgt1);
  84.         SetCameraFOV(80, 1, 2);
  85.         PlaySoundLocal(awesomewav, 0.75, 0, 0, 0);
  86.         Sleep(6);
  87.         StopKey(actorindy, in_track0, 0.5);
  88.         SetCameraLookInterp(2, 0);
  89.         CopyOrientAndPos(actorindy, player);
  90.         SetThingFlags(actorindy, 0x80000);
  91.         ClearThingFlags(player, 0x80000);
  92.         SetCurrentCamera(1);
  93.         SetCameraFOV(90, 0, 0);
  94.         ClearActorFlags(player, 0x200000);
  95.         EndCutscene();
  96.         
  97.     }        
  98.     return; 
  99.     
  100. #........................................................................................
  101. end
  102.  
  103.  
  104.